package com.pipidan.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pipidan.blog.entity.Blog;
import com.pipidan.blog.queryvo.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * description:
 * author:runda
 * time:2022/11/19 20:46
 */
@Mapper
public interface BlogMapper extends BaseMapper<Blog> {
    //查询首页最新博客列表信息
    List<FirstPageBlog> getFirstPageBlog();

    List<RecommendBlog> getAllRecommendBlog();

    List<NewComment> getNewComment();

    List<FirstPageBlog> getSearchBlog(String query);

    DetailedBlog getDetailedBlog(Long id);

    void updateViews(Long id);

    void getCommentCountById(Long id);

    List<BlogQuery> getAllBlogQuery();
}
